package com.eshore.norm.pattern.builder.demo1;

/**
 * 指挥者
 *
 * @author: v-chenjl62
 * @date: 2024/2/1 10:39
 */
public class HouseDirector {
    /**
     * 聚合
     */
    HouseBuilder houseBuilder = null;

    HouseDirector(HouseBuilder houseBuilder){
        this.houseBuilder=houseBuilder;
    }

    /**
     * 指挥者统一管理建造房子的流程
     */
    public House constructHouse() {
        houseBuilder.buildBasic();
        houseBuilder.buildWalls();
        houseBuilder.roofed();
        return houseBuilder.buildHouse();
    }

}
